<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>小说管理</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../css/main.css">
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../js/common.js"></script>
</head>
<style>
    .tags-line{
        display: inline-block;
    }
    .addBookfrom{
        width:100%;
    }
    .form-group{
        /*width:auto;*/
        height: 50px;
        padding: 0px;
    }
    .form-group>div{
        height:100%;
    }
    .col-sm-6,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-9{
        padding-right:0;
    }
    .col-sm-2,.control-label{
        padding-top: 0!important;
    }

</style>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showDom == 'addOrEdit2'" class="panel panel-default" style="min-height: 100%">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">作品名称：</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="book.bookname" placeholder="书名"/>
                </div>
            </div>

            <div class="form-group" style="height: 230px;">
                <div class="col-sm-2 control-label">作品封面：</div>
                <div class="col-sm-10">
                    <label for="file" :style='{ backgroundImage : "url("+book.picurl+")"} |pic ' class="img-bg userPic" style="display: block;width:188px;height:230px;background-size:cover;cursor: pointer"></label>
                    <input style="display: none" type="file" accept="image/gif,image/jpeg,image/jpg,image/png" ref="file" id="file" name="file" @change="changeImage($event)" class="form-control" placeholder="图片地址"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="display: flex;justify-content: flex-end;align-items: center;">作品分类：</div>
                <div class="col-sm-10" style="display: flex;justify-content: flex-start;">
                    <select v-model="book.categoryid" style="width: 200px" @change="selectChange">
                        <option selected  value="">请选择</option>
                        <option v-for="sel in sels" v-bind:value="sel.id">{{sel.categoryyname}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="display: flex;justify-content: flex-end;align-items: center;">写作状态：</div>
                <div class="col-sm-10" style="display: flex;justify-content: flex-start;align-items: center">
                    <div style="display: flex;margin-right: 10px">
                        <input type="radio"  :checked="book.isserialize" :disabled="!updateBookId" name="serilize" @click="changeStatus(1)" />
                        <span>连载</span>
                    </div>
                    <div style="display:flex">
                        <input type="radio"  :checked="!book.isserialize" :disabled="!updateBookId" name="serilize" @click="changeStatus(0)" />
                        <span>完结</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="display: flex;justify-content: flex-end;align-items: center;">是否参赛：</div>
                <div class="col-sm-10" style="display: flex;justify-content: flex-start;align-items: center">
                    <div style="display: flex;margin-right: 10px">
                        <input type="radio" :disabled="isEdit" :checked="!book.isGame" name="game" @click="book.isGame=0"/>
                        <span>否</span>
                    </div>
                    <div style="display:flex">
                        <input type="radio" :disabled="isEdit"  :checked="book.isGame" name="game" @click="book.isGame=1"/>
                        <span>是</span>
                    </div>
                </div>
            </div>
            <div class="form-group" v-show="!updateBookId">
                <div class="col-sm-2 control-label" style="display: flex;justify-content: flex-end;align-items: center;">首发状态：</div>
                <div class="col-sm-10" style="display: flex;justify-content: flex-start;align-items: center">
                    <div style="display: flex;margin-right: 10px">
                        <input type="radio" :disabled="isEdit" :checked="book.publish" name="shoufa" @click="changeShoufa(1)"/>
                        <span>蝉阅读首发</span>
                    </div>
                    <div style="display:flex">
                        <input type="radio" :disabled="isEdit"  :checked="!book.publish" name="shoufa" @click="changeShoufa(0)"/>
                        <span>非蝉阅读首发</span>
                    </div>
                </div>
            </div>
            <div v-show="!updateBookId" style="width: 400px;padding: 5px;margin-left: 132px;margin-bottom: 20px;background-color:#F9F5DE;border: 1px solid #DDC793"><i class="fa fa-exclamation-circle" style="color: #0d6aad"></i> 作品审核后，不得更改</div>
            <div class="form-group" style="display: flex;justify-content: flex-start;">
                <div class="col-sm-2 control-label" style="display: flex;justify-content: flex-end;align-items: center;">授权级别：</div>
                <div class="col-sm-10" style="display: flex;justify-content: flex-start;align-items: center">
                    <div style="display: flex;margin-right: 10px">
                        <input type="radio"  :disabled="isEdit" :checked="!book.impower" @click="book.impower=0" name="shouquan" />
                        <span>普通授权</span>
                    </div>
                    <div style="display:flex">
                        <input type="radio"  :disabled="isEdit" :checked="book.impower" @click="book.impower=1" name="shouquan" />
                        <span>独家授权</span>
                    </div>
                </div>
            </div>
            <div style="width: 400px;padding: 5px;margin-left: 132px;margin-bottom: 20px;background-color:#F9F5DE;border: 1px solid #DDC793"><i class="fa fa-exclamation-circle" style="color: #0d6aad"></i>  我保证我是此作品的著作权人，并将此作品非独家发表于蝉阅读，并保证不会在作品内任何位置宣传或提及其他网站网址。任何组织与个人如欲转载，须征得我同意</div>
            <div class="form-group" style="height: 220px;">
                <div class="col-sm-2 control-label">作品简介：</div>
                <textarea v-model="book.introduction" style="width: 400px;height: 200px">
                </textarea>
            </div>
            <!--<div class="form-group" style="height: 220px;">-->
                <!--<textarea v-model="book.origin" value="1" style="width: 400px;height: 200px" hidden="hidden">-->
                <!--</textarea>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate('1,原创')" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="backToBook" value="返回" v-if="updateBookId"/>
            </div>
        </form>
    </div>
</div>

<script src="../../js/modules/sys/addBook.js"></script>
</body>
</html>